package com.lixiang.controller;

import com.lixiang.entity.Emp;
import com.lixiang.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class EmpController {
    @Autowired
    private EmpService empService;

    @RequestMapping("/login")
    public ModelAndView login(String name, String password){
        return empService.login(name,password);
    }
    @RequestMapping("/register")
    public ModelAndView register(Emp emp){
        return empService.regist(emp);
    }
}
